import request from '@/libs/util.request'
import globalInterface from '@/common/global'
/**
 *
 * @param data 用户登录信息
 * @returns
 */
export function AccountLogin (data: globalInterface.IObject) {
  return request({
    url: '/admin/account/login',
    method: 'post',
    params: data,
    loading: { text: '登录中...' }
  })
}
/**
 *
 * @param data 获取用户信息
 * @returns
 */
export function GetUserInfo (data: globalInterface.IObject) {
  return request({
    url: '/admin/account/getUserInfo',
    method: 'post',
    params: data
  })
}
/**
 *
 * @param accesstoken 退出登录
 * @returns
 */
export function AccountLogout (accesstoken: string) {
  return request({
    url: '/admin/account/removeToken',
    method: 'post',
    params: { accesstoken }
  })
}
